

class ArticleDetailData {
  int? id;
  String? title;
  String? imgUrl;
  String? content;
  int? readCount;
  int? likesCount;
  int? collectCount;
  String? isCollect;

  ArticleDetailData({this.id, this.title, this.imgUrl, this.content, this.readCount, this.likesCount, this.collectCount, this.isCollect});

  ArticleDetailData.fromJson(Map<String, dynamic> json) {
    if(json["id"] is int) {
      id = json["id"];
    }
    if(json["title"] is String) {
      title = json["title"];
    }
    if(json["imgUrl"] is String) {
      imgUrl = json["imgUrl"];
    }
    if(json["content"] is String) {
      content = json["content"];
    }
    if(json["readCount"] is int) {
      readCount = json["readCount"];
    }
    if(json["likesCount"] is int) {
      likesCount = json["likesCount"];
    }
    if(json["collectCount"] is int) {
      collectCount = json["collectCount"];
    }
    if(json["isCollect"] is String) {
      isCollect = json["isCollect"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["title"] = title;
    _data["imgUrl"] = imgUrl;
    _data["content"] = content;
    _data["readCount"] = readCount;
    _data["likesCount"] = likesCount;
    _data["collectCount"] = collectCount;
    _data["isCollect"] = isCollect;
    return _data;
  }
}